// 组织架构管理数据
var proColumns = [{
  id: 'proName',
  title: '上级部门',
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'role',
  title: '部门名称',
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'level',
  title: '部门负责人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'time',
  title: '提交时间',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-info" onclick=""><i class="fa fa-edit"></i>  编辑</button>';
    content += '  ';
    content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var proOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    proName: '股东大会',
    role: '董事会',
    level: '张三',
    time: '9999-99-99'
  }, ],
  columns: proColumns,
  gridContainer: 'proContainer',
  toolbarContainer: 'proToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var proGrid = $.fn.dlshouwen.grid.init(proOption);
$(function () {
  proGrid.load();
});
// 员工管理数据
var usersColumns = [{
  id: 'u1',
  title: '公司名称',
  type: 'string',
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u2',
  title: '所属部门',
  type: 'string',
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u3',
  title: '直接领导',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u4',
  title: '岗位名称',
  type: 'string',
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u5',
  title: '座位号',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u7',
  title: '入职时间',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u6',
  title: '工号',
  type: 'string',
  width: 80,
  columnClass: 'text-center',
}, {
  id: 'u8',
  title: '中文名',
  type: 'string',
  width: 80,
  columnClass: 'text-center',
}, {
  id: 'u9',
  title: '英文名',
  type: 'string',
  width: 80,
  columnClass: 'text-center',
}, {
  id: 'u10',
  title: '性别',
  type: 'string',
  width: 50,
  columnClass: 'text-center',
}, {
  id: 'u11',
  title: '出生日期',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u12',
  title: '婚姻状况',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u13',
  title: '联系方式1',
  type: 'string',
  width: 100,
  columnClass: 'text-center',
}, {
  id: 'u14',
  title: '联系方式2',
  type: 'string',
  width: 100,
  columnClass: 'text-center',
}, {
  id: 'u15',
  title: '常住地',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u16',
  title: '微信号',
  type: 'string',
  width: 100,
  columnClass: 'text-center',
}, {
  id: 'u17',
  title: 'QQ号',
  type: 'string',
  width: 100,
  columnClass: 'text-center',
}, {
  id: 'u18',
  title: '邮件地址',
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'u19',
  title: '固定电话-分机号',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'u20',
  title: '在职状态',
  type: 'string',
  width: 80,
  columnClass: 'text-center',
}, {
  id: 'u21',
  title: '私密级别',
  type: 'string',
  width: 100,
  hideType: 'xs|sm|md|lg',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-info" onclick=""><i class="fa fa-edit"></i>  编辑</button>';
    content += '  ';
    content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var usersOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '员工管理',
  datas: [{
    u1: '赛特斯信息科技股份有限公司-南京分公司',
    u2: 'IT信息中心',
    u3: '张三',
    u4: '开发工程师',
    u5: '002',
    u6: 'H058',
    u7: '2018-08-08',
    u8: '王五',
    u9: 'Tomi',
    u10: '男',
    u11: '1990-09-09',
    u12: '未婚',
    u13: '12345678901',
    u14: '10987654321',
    u15: '南京',
    u16: 'Wangwu001',
    u17: '4543589329',
    u18: 'wangwu@email.com',
    u19: '025-232324-1',
    u20: '在职',
    u21: '公开',
  }, ],
  columns: usersColumns,
  gridContainer: 'usersContainer',
  toolbarContainer: 'usersToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var usersGrid = $.fn.dlshouwen.grid.init(usersOption);
$(function () {
  usersGrid.load();
});
//时间控件
$('#datetime').datepicker({
  format: 'yyyy-dd-mm'
});
$('#datetime-1').datepicker({
  format: 'yyyy-dd-mm'
});